﻿using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Trippy.CollidableGameComponents;
using Trippy.CollidableGameComponents.Agents;
using Trippy.Levels;

namespace Trippy.Abilities
{
    class Scry : Ability
    {
        public Scry(Level level) : base (level)
        {
            name = "Scry";
            icon = CurrentLevel.Game.Content.Load<Texture2D>("Sprites/Ability Icons/scry");
        }

        public override void OnActivate()
        {
            State = AbilityState.Unavailable;
            SetTimer(5);
            CurrentLevel.Camera.LinearZoom(0.5f, 0.25f);
 	        base.OnActivate();
        }

        protected override void OnTimer()
        {
            State = AbilityState.Available;
            CurrentLevel.Camera.LinearZoom(1.0f, 0.25f);
            base.OnTimer();
        }

        public override void OnRemove()
        {
            KillTimer();
            CurrentLevel.Camera.LinearZoom(1.0f, 0.25f);
            base.OnRelease();
        }
    }
}
